<!DOCTYPE html>
<html>
<head>
    <title>模板</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <#if shiro.hasPermission("noc:noctemplate:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
        </#if>
        <#if shiro.hasPermission("noc:noctemplate:update")>
        <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
    </#if>
    <#if shiro.hasPermission("noc:noctemplate:delete")>
        <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
    </#if>
    <#if shiro.hasPermission("noc:noctemplate:isDefault")>
    <a class="btn btn-primary" @click="isDefault"><i class="fa fa-trash-o"></i>&nbsp;设置为主活动</a>
    </#if>
</div>
<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>

<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-2 control-label">模板名称</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.template" placeholder="模板名称"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">头图_PC(1280*160)</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.headImgPc" placeholder="尺寸 1280*160"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">头图(1000*400)</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.headImg" placeholder="尺寸 10000*400"/>

            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">底图_PC(1280*80)</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.footImgPc" placeholder="尺寸 1280*80"/>

            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">底图(1000*80)</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.footImg" placeholder="尺寸 1000*80"/>

            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">背景色</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.colorBg" placeholder="背景色"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">联系电话</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.contactTel" placeholder="联系电话"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">链接</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.url" placeholder="链接"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">短信账号(阿里云)</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.msgAccout" placeholder="短信账号(验证码)"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">短信密码</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.msgPwd" placeholder="短信密码"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">短信账号(优讯通)</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.msgyxAccount" placeholder="短信账号(营销)"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">短信密码</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.msgyxPwd" placeholder="短信密码"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">头条key</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.toutiaoKey" placeholder="头条key"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">头条Token</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.toutiaoToken" placeholder="头条Token"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">公众号appid</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.appid" placeholder="公众号appid"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">公众号appsecret</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.appsecret" placeholder="公众号appsecret"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2 control-label">同行人数</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.tongxing" placeholder="同行人数"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2 control-label">广告地址</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="nocTemplate.guanggao" placeholder="广告地址"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/noc/noctemplate.js?_${.now?long}"></script>
</body>
</html>